<!DOCTYPE html>
<html lang="zh">
<head>


    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=9"/>

    <title>搜索</title>
    <meta name="referrer" content="no-referrer">
    <meta name="keywords"
          content="电影票网上预订购买,在线选座购票,电影院最新上映电影,网上预定电影票,电影院排片表,易得票"/>
    <meta name="description"
          content="易得票为您提供电影票网上购买预订，电影院影讯查询，最新热映电影选座购票，优惠电影票。在线选座，轻松购票！"/>
    <meta name="referrer" content="no-referrer"/>
    <link href="https://static.ydpcdn.cn/css/cdn_ydpstyle.css?201404291501" rel="stylesheet"/>

    <link rel="stylesheet" href="https://static.ydpcdn.cn/css/smoothness/jquery-ui-1.10.3.custom.min.css"
          media="screen"/>
    <script src="https://unpkg.com/vue@2.7.14/dist/vue.min.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="https://static.ydpcdn.cn/scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src='https://static.ydpcdn.cn/scripts/jquery.unobtrusive-ajax.min.js' type='text/javascript'></script>

    <script src='https://static.ydpcdn.cn/scripts/jquery.validate.min.js' type='text/javascript'></script>
    <script src='https://static.ydpcdn.cn/scripts/jquery.validate.unobtrusive.min.js' type='text/javascript'></script>
    <script src='https://static.ydpcdn.cn/scripts/jquery-ui-1.10.3.custom.min.js' type='text/javascript'></script>

    <!--    <script src="https://static.ydpcdn.cn/scripts/cdn_ydp.js?201404291501"></script>-->


</head>
<body>
<div id="showFastDiv" style="display: none;">
</div>
<div class="wrapper">
    <!--顶部开始-->
    <div class="top" id="loginSection">
        <!--顶部开始-->
        <div class="top_box">
            <div class="top_one">
                看电影，来源辰影院！
            </div>
            <div id="app7">
                <template>
                    <div>
                        <div v-if="!isLoggedIn" class="top_three">
                            <a href="login.html" class="cRmain">登录</a><span class="cRddd"> 丨 </span><a
                                href="signup.html" class="cRmain">注册</a><span class="cRddd"> 丨 </span>
                        </div>

                        <div v-else class="top_three">
                            <p>
                                <span class="cRmain">{{ uname }}</span>欢迎来到源辰影院！
                                <a href="login.html" class="cRmain">[退出]</a> |
                                <a href="myorder.html" class="cRmain">[订单]</a><span class="cRddd">  </span>
                            </p>
                        </div>
                    </div>
                </template>

                <script>

                    var v = new Vue({
                        el: "#app7",
                        data() {
                            return {
                                isLoggedIn: false,
                                uname: '',
                            };
                        },
                        created() {
                            let p = new URLSearchParams();
                            axios.post("login?op=userinfo", p).then(res => {
                                if (res.data.code == 200) {
                                    this.isLoggedIn = true;
                                    this.uname = res.data.uname;
                                }
                            })
                        },
                    });
                </script>
            </div>
        </div>
    </div>
</div>
<!--快速登录-->
<!--顶部 End-->


<!--EndDonut-->
<!--顶部 End-->
<!--头部开始-->
<div class="header" id="searchPage">
    <h1>源辰影院</h1>
    <div class="regionbox" style="z-index: 1;" id="regionSection">
        <script type="text/javascript">
            var engName = "hengyang";
            var chinaName = $("#divCityList").find("ul li").find("a[href='/" + engName + "']").html();
            $("#spanCityName").html(chinaName);
            $("#divPCity").mouseover(function (e) {
                ShowCityList();
            })
            $("#divCityList").hide();
            $("#regionSection").hover(
                function () {
                    $("#divCityList").show();
                    $("#divPCity").addClass("hover");
                },
                function () {
                    $("#divCityList").hide();
                    $("#divPCity").removeClass("hover");
                }
            );
        </script>

    </div>
    <div id="searchform">
        <div style="width: 361px; float: right; margin-top: 5px">
            <!--搜索开始-->
            <div class="search">
                <label>
                    <input type="text" class="search_form" name="keyword"
                           placeholder="请输入电影" id="searchLabel">
                </label>
                <button href="search.html" class="search_button" @click="searchMovies()" title="搜索" value=""></button>
            </div>
            <!--搜索 End-->
        </div>

        <!--头部 End-->
        <!--导航开始-->
        <div class="nav_box">
            <div class="nav">
                <ul id="defaultUL">
                    <li><a href="index.html" title="首页">首页</a></li>
                    <li><a href="movie.html" title="热映电影">热映电影</a></li>
                    <li><a href="cinema.html" title="影厅">影厅</a></li>
                </ul>
            </div>
        </div>
        <!--导航 End-->
        <div id="body">
            <section class="content-wrapper main-content clear-fix">


                <!--内容框架-->
                <div class="center">

                    <div class="m_left  border">

                        <div class="s_bd">
                            <div class="c_box mt10">搜索<b class=" fs14 cRmain">{{searchResult}}</b>获得约 <span
                                    class="cRmain">{{smovies.length}}</span>
                                条结果
                            </div>
                        </div>
                        <div v-for="s in smovies" class="m_lsit">
                            <dl>
                                <dd>
                                    <a href="movie1.html" :title="s.mname" target="_blank">
                                        <img :data-original="s.image" :src="s.image" :alt="s.title"
                                             :width="143" :height="200">
                                    </a></dd>
                                <dt>
                                    <h2 class="font_family"><a href="movie1.html" title="s.mname">{{s.mname}}</a>
                                    </h2>

                                    <ul>
                                        <li><span class="cRgray">类型：</span>{{s.genre}}</li>
                                        <li><span class="cRgray">导演：</span>{{s.director}}</li>
                                        <li><span class="cRgray">主演：</span>{{s.actors}}</li>
                                    </ul>
                                    <a href="movie1.html" class="a_link">查看详情</a></dt>
                            </dl>
                        </div>


                        <!--底部间隔-->
                        <div class="hg10"></div>

                    </div>


                    <!--正在热映-->
                    <div class="right border">


                        <!--正在热映-->
                        <div class="border" id="top6">
                            <div class="m_title">
                                <h3 class="font_family">
                                    <b>正在热映</b></h3>
                            </div>
                            <dl v-for="t in hotMovies" class="film_tl_box mt10">
                                <dd>
                                    <a :href="t.mname" :title="t.mname" target="_blank">
                                        <img :data-original="t.image" :src="t.image" :alt="t.title"
                                             :width="120" :height="160">
                                    </a></dd>
                                <dt>
                                    <h2 class="lh24">
                                        <a href="#">

                                            {{t.mname}}
                                        </a></h2>
                                    <div title="6">
                                        评分： {{t.rate_num}}
                                    </div>
                                    <p>
                                       导演: {{t.director}}
                                    </p>
                                    <p title="t.starts" class="lh21">
                                        主演：
                                        {{t.actors}}
                                    </p>
                                    <p>
                                        <a href="#" class="h_link">选座购票</a>
                                    </p>
                                </dt>
                            </dl>
                            <div class="hg50">
                            </div>
                        </div>
                        <!--正在热映 End-->

                    </div>
                </div>

            </section>
        </div>

        <!--帮助 版权-->
        <div class="explain">
            <div class="explain_er">
                <dl>
                    <dd>
                        <p class="a1">
                        </p>
                        新手上路
                    </dd>
                    <ul>
                        <li><a href="/help/register" title="会员注册">会员注册</a></li>
                        <li><a href="/help/login" title="如何登录">如何登录</a></li>
                        <li><a href="/help/process" title="快速购票">快速购票</a></li>
                        <li><a href="/help/password" title="找回密码">找回密码</a></li>
                    </ul>
                </dl>
                <dl>
                    <dd>
                        <p class="a2">
                        </p>
                        购票指南
                    </dd>
                    <ul>
                        <li><a href="/help/process" title="购票流程">购票流程</a></li>
                        <li><a href="/help/method" title="取票方法">取票方法</a></li>
                        <li><a href="/help" title="支付方式">支付方式</a></li>
                    </ul>
                </dl>
                <dl>
                    <dd>
                        <p class="a3">
                        </p>
                        常见问题
                    </dd>
                    <ul>
                        <li><a href="/help" title="购票常见问题">购票常见问题</a></li>
                        <li><a href="/help/recharge" title="会员充值问题">会员充值问题</a></li>
                        <li><a href="/help/price" title="影片票价问题">影片票价问题</a></li>
                        <li><a href="/help/coupon" title="优惠劵">优惠劵</a></li>
                    </ul>
                </dl>
                <dl>
                    <dd>
                        <p class="a4">
                        </p>
                        关于我们
                    </dd>
                    <ul>
                        <li><a href="/about">公司介绍</a></li>
                        <li><a href="/sitemap">网站地图</a></li>
                    </ul>
                </dl>
                <dl>
                    <dd>
                        <p class="a5">
                        </p>
                        客户服务
                    </dd>
                    <ul>
                        <li><a href="#" class="bz">电话：400-677-8292</a></li>
                        <li><a href="#" class="bz">邮箱：service@yidepiao.com</a></li>
                    </ul>
                </dl>
            </div>
        </div>
    </div>
    <script>
        var v = new Vue({
            el: "#searchPage",
            data: {
                smovies: [],
                hotMovies: [],
                searchResult: '',

            },
            created() {
                // 从数据库中获取数据
                this.topMovies();
            },
            methods: {
                searchMovies() {

                    axios.get("movie?op=search").then(res => {
                        // 只测试是否返回结果
                        this.smovies = res.data;
                    })
                },
                searchMovies() {
                    this.smovies = [];
                    const searchInput = document.getElementById('searchLabel');
                    const searchValue = searchInput.value;
                    this.searchResult = searchValue;
                    console.log(searchValue); // 打印输入的值
                    let p = new URLSearchParams();
                    p.append("mname", searchValue);
                    axios.post("movie?op=search", p).then(res => {
                        // 只测试是否返回结果
                        this.smovies = res.data;
                    })
                },
                topMovies() {
                    axios.post("movie?op=top6").then(res => {
                        this.hotMovies = res.data;
                    })
                }
            }
        })
    </script>
    <!--正在热映 End-->


    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-35906595-1']);
        _gaq.push(['_addOrganic', 'm.baidu.com', 'word', true]);
        _gaq.push(['_addOrganic', 'image.baidu.com', 'word', true]);
        _gaq.push(['_addOrganic', 'baidu', 'word']);
        _gaq.push(['_addOrganic', 'soso', 'w']);
        _gaq.push(['_addOrganic', '3721', 'name']);
        _gaq.push(['_addOrganic', 'youdao', 'q']);
        _gaq.push(['_addOrganic', 'www.so.com', 'q']);
        _gaq.push(['_addOrganic', 'so.360.cn', 'q']);
        _gaq.push(['_addOrganic', 'vnet', 'kw']);
        _gaq.push(['_addOrganic', 'sogou', 'query']);
        _gaq.push(['_addOrganic', 'bing', 'q']);
        _gaq.push(['_trackPageview']);

        (function () {
            var ga = document.createElement('script');
            ga.type = 'text/javascript';
            ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(ga, s);
        })();
    </script>
</div>
</body>
</html>
<!--YDP-SERVER-05 page createtime:2023/8/29 09:27:27-->